package com.example.demo.service.impl;

import com.example.demo.service.ProductClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by zhangjiawen on 2019/5/22.
 *
 */
@Component
public class FallBackProductClient implements ProductClient {

    /***
     * 商品服务的降级处理
     * @param id
     * @return
     */
    @Override
    public String findById(@RequestParam(value = "id") int id) {
        System.out.println("product-server 服务异常-熔断！");
        return null;
    }
}
